package com.collect.zambia.zhiScene.zhiTelemarketing.zhiPerformance.zhiSort;

import com.collect.zambia.zhiBean.zhiReceive.ZHIRTelemarketingPerformanceEntity;
import com.collect.zambia.zhiUtils.ZHICalendarUtil;

import java.util.Comparator;

public class ZHITelemarketingCompareByDateDESC implements Comparator<ZHIRTelemarketingPerformanceEntity> {
    @Override
    public int compare(ZHIRTelemarketingPerformanceEntity o1, ZHIRTelemarketingPerformanceEntity o2) {

        long o1DateL = ZHICalendarUtil.getTimeFromDateString(o1.getAssignDate() + " 00:00:00", null);
        long o2DateL = ZHICalendarUtil.getTimeFromDateString(o2.getAssignDate() + " 00:00:00", null);

        return Long.compare(o2DateL, o1DateL);
    }
}
